package cn.com.sbell.vss.util;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.cookie.CookiePolicy;

import cn.com.sbell.vss.VssConstants;

public class HttpClientInitializer {
	private HttpClient httpClient;

	public void init() {
		httpClient.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
		httpClient.getParams().setContentCharset(VssConstants.DEFAULT_ENCODINIG);
	}

	public void destroy() {
		MultiThreadedHttpConnectionManager.shutdownAll();
	}

	public void setHttpClient(HttpClient httpClient) {
		this.httpClient = httpClient;
	}
}
